package com.sinosoft.suggest.view;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;

import com.sinosoft.R;

public class SugCoverAdapter extends BaseAdapter {

	private Context context;
	private int[] MyImageIDs = { R.drawable.print_cover_0,
			R.drawable.print_cover_0, R.drawable.print_cover_0,
			R.drawable.print_cover_0, R.drawable.print_cover_0 };

	public SugCoverAdapter(Context context) {
		// TODO Auto-generated constructor stub
		this.context = context;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return MyImageIDs.length;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		ImageView i = new ImageView(this.context);
		i.setImageResource(this.MyImageIDs[position]);
		i.setScaleType(ImageView.ScaleType.FIT_XY);
		i.setLayoutParams(new Gallery.LayoutParams(75, 100));
		return i;
	}

}
